{% extends "layouts/base.html" %} {% block title %} {% endblock %}

<!-- Specific Page CSS goes HERE  -->
{% block stylesheets %}{% endblock stylesheets %} {% block content %}

<div class="row">
  <div class="col-md-12">
    <div class="card card-plain">
      <div class="card-header card-header-primary">
        <h4 class="card-title mt-0">历史工单记录</h4>
      </div>
      <div class="card-body">
        <div class="table-responsive">
          <table class="table table-hover">
            <thead class="text-primary">
              <th>编号</th>
              <th>标题</th>
              <th>状态</th>
              <th>创建时间</th>
              <th>完成时间</th>
            </thead>
            <tbody>
              {% for task in tasks%}
              <tr>
                <td>{{task.id}}</td>
                <td>{{task.title}}</td>
                <td>
                  {% if task.completed %} 已完成 {% else %} 未完成 {% endif %}
                </td>
                <td class="text-primary">{{task.created}}</td>
                <td class="text-primary">{{task.finished }}</td>
                <td>
                  <a href="/task/{{task.id}}" class="btn btn-primary"
                    >查看详情</a
                  >
                </td>
              </tr>
              {% endfor %}
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>

{% endblock content %}

<!-- Specific Page JS goes HERE  -->
{% block javascripts %}{% endblock javascripts %}
